import { makeAutoObservable } from 'mobx';

interface IMicroData {
    from:string;
    message:string;
    state:any;
}

class MicroData {
    constructor() {
        makeAutoObservable(this);
    }
    public microLoading = false;
    public microServiceData:IMicroData = {
        from:'',
        message:'',
        state:{}
    }

    updateLoading(loading: boolean) {
        this.microLoading = loading;
    }

    updateMicroServiceData(data:IMicroData){
        this.microServiceData = data;
    }
}

const microData = new MicroData();

export default microData;